package sketch.generator.examples;

import java.util.ArrayList;
import java.util.List;

public class SequentialValue<T extends Object> {

	private List<T> values = new ArrayList<T>();
	
	public SequentialValue(T...values) {
		for(T value : values) {
			this.values.add(value);
		}
	}
	
	public SequentialValue(List<T> values) {
		for(T value : values) {
			this.values.add(value);
		}
	}
	
	public List<T> getValues() {
		return this.values;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		
		for(T value : values) {
			sb.append(value);
			sb.append(", ");
		}
		
		sb = sb.deleteCharAt(sb.lastIndexOf(","));
		return sb.toString().trim();
	}
	
}
